package tmt.usercenter.web.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.tmt.jpafieldvalueconvert.IJpaFieldValueMonitor;
import com.tmt.jpafieldvalueconvert.JpaFieldValueChangeListener;
import com.tmt.jpafieldvalueconvert.JpaFieldValueMonitor;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;

/**
 * 系统参数表
 */
@Getter
@Setter
@Entity
@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"})
@EntityListeners({JpaFieldValueChangeListener.class})
public class SystemParam extends BaseDomain {

	@Column(length = 50, nullable = false, unique = true)
	private String paramName;

	@Column(length = 50, nullable = false, unique = true)
	private String paramCode;

	@JpaFieldValueMonitor(monitor = IJpaFieldValueMonitor.class)
	@Column(nullable = false)
	private String paramValue;

	@Column
	private String paramNote;

}

